﻿@{
    BusinessLayer.DatabaseEntities.Operator info = new BusinessLayer.DatabaseEntities.Operator();
    if (null != @Session["adminLoginInfo"] as BusinessLayer.DatabaseEntities.Operator)
    {
        info = @Session["adminLoginInfo"] as BusinessLayer.DatabaseEntities.Operator;
    }
}


<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>CSC - @ViewBag.Title</title>
        @*<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />*@
        <meta name="viewport" content="width=device-width" />
        @Styles.Render("~/content/font-awesome.min.css")
        @Styles.Render("~/content/web/style.css")
        @Scripts.Render("~/scripts/jquery-1.8.2.min.js")
    </head>
    <body>
        <header class="style-bg-black">
            <h3 class="style-green"><img src="~/images/csclogo.png" alt=""> Customer Service Center</h3>

            <ul class="menu">
                <li id="Tickets" class="menu-li">
                    <span>Tickets</span>
                    <ul>
                        <li class="redirect" id="import">Import Tickets</li>
                        <li class="redirect" id="all">All Tickets</li>
                        <li class="redirect" id="my">My Open Tickets</li>
                    </ul>
                </li>

                <li id="Ratings" class="menu-li">
                    <span class="redirect" id="ratings">Ratings</span>
                </li>

                @*<li id="Reports" class="menu-li">
                    <span class="redirect" id="reports">Reports</span>
                </li>*@
                @if(info.RoleID == 1){
                    <li id="Settings" class="menu-li">
                        <span class="redirect" id="settings">Settings</span>
                    </li>
                }
                
            </ul>

            <ul class="menu" style="float: right;">
                <li id="userOperation" class="menu-li">
                    <span><i class="fa fa-user-o"></i> Hi,@info.UserName</span>
                    <ul>
                        <li class="redirect" id="resetPassword">Reset Password</li>
                        <li class="redirect" id="exit">Exit</li>
                    </ul>
                </li>
            </ul>
                @*<span id="userOperation" style="position: absolute;right: 25px;top: 25px;cursor: pointer;"><i class="fa fa-user-o"></i> Hi,@info.UserName</span>*@
</header>

        @RenderBody()


        <script>
            /*页面重定向*/
            $(function () {
                $(".redirect").click(function () {
                    var chosenID = $(this).attr("id");
                    switch (chosenID) {
                        case "import":         /*跳转到import tickets*/
                            location.href = "../tickets/ticketsrequestinfo?flag=" + chosenID;
                            break;
                        case "all":         /*跳转到all tickets*/
                            location.href = "../tickets/ticketsrequestinfo?flag=" + chosenID;
                            break;
                        case "my":          /*跳转到my open tickets*/
                            location.href = "../tickets/ticketsrequestinfo?flag=" + chosenID;
                            break;
                        case "ratings":     /*跳转到ratings*/
                            location.href = "../ratings/ratings";
                            break;
                            //case "reports":       /*跳转到reports*/
                            //    location.href = "../reports/reports";
                            //    break;
                        case "settings":     /*跳转到settings*/
                            location.href = "../settings/settings";
                            break;
                        case "resetPassword":
                            @*@{
                                 Session.Remove("adminLoginInfo");
                            }*@
                            location.href = "../Home/ResetPassword";
                            break;
                        case "exit":
                            location.href = "../Home/Login";
                            break;
                    }
                });
            })
        </script>
        @*<header>
            <div class="content-wrapper">
                <div class="float-left">
                    <p class="site-title">@Html.ActionLink("your logo here", "Index", "Home")</p>
                </div>
                <div class="float-right">
                    <section id="login">
                        @Html.Partial("_LoginPartial")
                    </section>
                    <nav>
                        <ul id="menu">
                            <li>@Html.ActionLink("Home", "Index", "Home")</li>
                            <li>@Html.ActionLink("About", "About", "Home")</li>
                            <li>@Html.ActionLink("Contact", "Contact", "Home")</li>
                        </ul>
                    </nav>
                </div>
            </div>
        </header>*@
        @*<div id="body">
            @RenderSection("featured", required: false)
            <section class="content-wrapper main-content clear-fix">
                @RenderBody()
            </section>
        </div>*@
        @*<footer>
            <div class="content-wrapper">
                <div class="float-left">
                    <p>&copy; @DateTime.Now.Year - My ASP.NET MVC Application</p>
                </div>
            </div>
        </footer>*@

        @*@Scripts.Render("~/bundles/jquery")
        @RenderSection("scripts", required: false)*@
    </body>
</html>
